{#<script type="text/javascript">#}
{#    window.UEDITOR_HOME_URL="/static/ueditor143utf8/";#}
{#    //实例化编辑器#}
{#    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例#}
{#    var ue = UE.getEditor('editor');#}
{#</script>#}



<!--百度UE富文本编辑器-->
<script type="text/javascript" charset="utf-8" src="/static/ueditor143utf8/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/ueditor143utf8/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/static/ueditor143utf8/lang/zh-cn/zh-cn.js"></script>

<script type="text/javascript">
    window.UEDITOR_HOME_URL="/static/ueditor143utf8/";
</script>
<!--百度UE富文本编辑器-->



<h2 class="contentTitle">邮件发送</h2>
<div class="pageContent">
	<form method="post" action="/market/emailsend/" class="pageForm required-validate" onsubmit="return validateCallback(this)">
		{% csrf_token %}
        <div class="pageFormContent nowrap" layoutH="97">
            <dl>
				<dt>客户分组：</dt>
				<dd style="width: 660px">
                    <label><input type="checkbox" name="cgroup" value="all" checked="checked"/>所有</label>
                    {% for foo in customer %}
                    <label><input type="checkbox" name="cgroup" value="{{ foo.id }}" />{{ foo.groupname }}</label>
                    {% endfor %}
				</dd>
                <span style="color: #e50000">没有分组 请在客户列表上方 添加 客户分组</span>
			</dl>
            <dl></dl>
            <dl>
				<dt>发送者标题：</dt>
				<dd>
					<input type="text" name="FromTitle" maxlength="40" size="40" class="required" alt="发送者标题"/>
				</dd>
			</dl>
{#            <dl>#}
{#				<dt>接受者标题：</dt>#}
{#				<dd>#}
{#					<input type="text" name="ToTitle" maxlength="40" size="40" class="required" alt="接受者标题"/>#}
{#				</dd>#}
{#			</dl>#}
            <dl>
				<dt>标题：</dt>
				<dd>
					<input type="text" name="title" maxlength="40" size="40" class="required" alt="标题"/>
				</dd>
			</dl>
            <dl></dl>
            <dl class="nowrap">
                <dt>内容：</dt>
                <dd><textarea name="content" class="required" id="editor"></textarea></dd>
            </dl>
            <script type="text/javascript">
            var ue = UE.getEditor('editor',
                {
                    initialFrameWidth:950,
                    initialFrameHeight:200,
                    serverUrl: "/crm/uedit/",
                }
            );
            </script>
			<div class="divider"></div>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>

</div>

<script type="text/javascript">
function customvalidXxx(element){
	if ($(element).val() == "xxx") return false;
	return true;
}
</script>
